package week1.day3;

import java.util.Arrays;

/**
 * @Author fengzihao
 * @Date 2024-04-17 15:17
 */
public class DivideByTheFirstElement {
    public static void main(String[] args) {

        double[] numbers = {2.0,4.0,6.0,4.0};
        divideByTheFirstElement(numbers);
        System.out.println("numbers = " + Arrays.toString(numbers));

    }
    public static void divideByTheFirstElement(double[] numbers){
        double flag = numbers[0];
        for (int i = 0; i < numbers.length; i++) {
            numbers[i] = numbers[i]/flag;
        }
    }
}
